import Mock from 'mockjs'
Mock.setup({
    timeout: '300-600'
})
let alarmsInfo = Mock.mock({
    'code': 1,
    'msg': '',
    'data': {
      'id': 1,
      'pattern': '0',
      'barAdmin': '1',
      'status': 1,
      'contacts': [
        {
          'name': 'key',
          'email': 'q@qq.com',
          'phone': '123456'
        },
        {
          'name': 'key1',
          'email': 'w@qq.com',
          'phone': '1234567'
        }
      ],
      'alarmType': [
        {
          'type': '0',
          'check': '1',
          'content': 'test',
          'threshold': '0'
        },
        {
          'type': '1',
          'check': '1',
          'content': 'testq',
          'threshold': '20'
        },
        {
          'type': '2',
          'check': '1',
          'content': 'testw',
          'threshold': '0'
        },
        {
          'type': '3',
          'check': '1',
          'content': 'test3',
          'threshold': '20'
        }
      ],
      'cycle': 1
    }
})
Mock.mock(/\/api\/alarms/, 'get', alarmsInfo)

let setAlarmsInfo = Mock.mock({
  'code': 1,
  'msg': '处理成功'
})
Mock.mock(/\/api\/alarms/, 'put', setAlarmsInfo)

export default Mock
